<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>评论详情</title>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="../css/Mycomments.css">
    <link href="../img/1-t.png" rel="SHORTCUT ICON" />
    <link rel="stylesheet" type="text/css" href="../css/city1.css">


    <script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script>
    <script src="../js/layui/layui-v2.4.5/layui/layui.all.js"></script>

</head>
<body>
	<nav class="clearfix">
        <div class="nav clearfix">
            <a class="logo fl" href="./shouye.html">
                <img src="../img/1-logo-white.3de707b4.png" alt="">
            </a>
            <div class="city-name fl dingwei" style="color:#fff;margin-left:20px;font-size:14px;width: 50px;background:  url(../img/1-arr-down.9f1dbfdd.png) no-repeat right center;">上海</div>
            <ul class="lei fl">
                <!-- <li class="fl"><a href="javascript:;">首页</a></li> -->
                <li class="ashow fl"><a href="javascript:;">全部演出</a>
                    <div class="submenu">
                        <ul class="allshow">
                            <li>
                                <a href="javascript:;">演唱会</a>
                            </li>
                            <li>
                                <a href="javascript:;">话剧歌剧</a>
                            </li>
                            <li>
                                <a href="javascript:;">休闲展览</a>
                            </li>
                            <li>
                                <a href="javascript:;">体育赛事</a>
                            </li>
                            <li>
                                <a href="javascript:;">音乐会</a>
                            </li>
                            <li>
                                <a href="javascript:;">儿童亲子</a>
                            </li>
                            <li>
                                <a href="javascript:;">舞蹈芭蕾</a>
                            </li>
                            <li>
                                <a href="javascript:;">戏曲综艺</a>
                            </li>
                        </ul>
                    </div>
                    
                </li>
                <li class="fl"><a href="javascript:;">发现</a></li>
                <li class="fl"><a href="javascript:;">十分现场</a></li>
            </ul>
            <div class="search fl">
                <input class="fl" type="text" placeholder="搜索演出、明星、场馆">
                <img src="../img/1-icon-search.c1ea7e12.png" alt="搜索" style="margin-bottom:5px;">
            </div>
            <div class="right fr">
                <a class="fl" href="javascript:;">登录</a>
                <span class="fl">|</span>
                <div class="app fl">手机票牛
                    <div class="submenu1">
                        <ul class="appshow">
                            <li class="clearfix">
                                <img  class="img1 fl" src="../img/1-qr-app.a2c8e636.png" width="84px" >
                                <div class="text fr"> 
                                    <div class="title">票牛APP</div>
                                    <div class="desc">热门票随时抢<br>折扣票随时买</div>
                                </div>
                            </li>
                            <li class="clearfix">
                                <div class="img2 fl"><img src="../img/1-qr-wechat.eceb0fc5.png"  height="84px"></div>
                                
                                <div class="text fr">
                                    <p class="title1">微信订阅号</p>
                                    <p class="desc">精彩剧评最新<br>活动随时看</p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </nav>
	<div class="cont" style="width: 1000px; margin: 0 auto">
		<div class="content">
			<div class="left">
				<div class="route" style="font-size:12px;">
                    <span><a href="index.html">票牛首页</a>><a class="commodityName" href="javascript:;"></a>><a href="javascript:history.back()">全部评论</a>><a href="javascript:;" style="font-size:12px;">评论详情</a></span>
				</div>
				<div class="left_C">
					<div class="left_T">
						<div class="left_T_l">
							<ul>
								<li class="tx"></li>
                                <li class="hideSpan mainUserId"></li>
								<li class="userName">用户151****0705-8BrTh</li>
								<li class="xs">新手</li>
								<li class="xx"></li>
							</ul>
							<p class="rq">2018-12-15</p>
						</div>
                        <div class="mainComment" style="padding-left: 7%;">
                            <p class="hideSpan mainCommId"></p>
                            <p class="mainContent"></p>
                        </div>
						<div class="Gn">
							<ul>
								<li class="hf">回复<span class="childCount"></span></li>
								<li class="z">赞<span class="likeCount"></span></li>
								<!--<li class="bj">编辑</li>-->
							</ul>
						</div>
					</div>
					<div class="left_Cc">
                        <form id="form">
                            <input name="commodityId" class="hideSpan commodityId"/>
                            <input name="belongToId" class="hideSpan belongToId"/>
                            <input name="fatherId" class="hideSpan fatherId"/>
                            <input name="userId" class="hideSpan userId" value="15"/>

						    <input type="text" id="pl" name="content" placeholder="写下你的评论..."/>
                        </form>
                        <div style="width: 600px;">
                            <button class="fr">回复</button>
                        </div>
					</div>
				</div>
                <div class="container">
                    <div class="main">
                        <div class="reply-container">
                            <div class="reply-list list-container">
                                <ul class="listChildComment">
                                    <li>
                                        <div class="userhead">
                                            <div style="background-image: url(&quot;https://img.piaoniu.com/mmopen/vi_32/icm1vBYxAg9n6dgW2Ss1ia9miaLciaHAA3L1jGpTg5o4wW7phnIZ32sJeb20c777YewKk3B3dNI8ab7BDKNJQIctFA/132&quot;); cursor: pointer;" class="avatar"></div>
                                            <div class="level">
                                                <div class="text">新手</div>
                                            </div>
                                        </div>
                                        <div class="main"><div class="user">
                                            <div class="name">J~K康锅👣 回复<a href="javascript:;">🎐_JoJo</a></div>
                                            <div class="time">2019-04-28</div>
                                        </div>
                                            <div class="content">我也不知道，</div>
                                        </div>
                                    </li>
                                    <li>
                                        <div class="userhead">
                                            <div style="background-image: url(&quot;https://img.piaoniu.com/mmopen/vi_32/NvdG4AtgSFcwZ24lqDteOftaykwqpSUA9kIz6c35WEibVAORn2SStDN0NibjVpVDgLxPPcScPqBz7GXwma8JHr9g/132&quot;); cursor: pointer;" class="avatar"></div>
                                            <div class="level"><div class="text"><i>V</i>3</div></div>
                                        </div>
                                        <div class="main">
                                            <div class="user">
                                                <div class="name">🎐_JoJo</div>
                                                <div class="time">2019-04-28</div>
                                            </div>
                                            <div class="content">什么时候开卖啊</div>
                                        </div>
                                    </li>
                                </ul>

                                <div style="width:660px;text-align: center;line-height: 30px;">
                                    <span id="pageNo" class="hideSpan">1</span>
                                    <span id="totalPage" class="hideSpan">2</span>
                                    <a href="javascript:void(0);" id="load-more" style="vertical-align: middle;font-size: 14px;">加载更多...</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
			</div>
            <!-- 右侧 -->
            <div class="right1">
				<div class="cont_top">
					<h3><a class="commodityName" href="">【小橙堡】《印象莫奈：时光印记艺术展》3.0西安站</a></h3>
					<p class="num_x">
						<span class="commodityStar">
							<strong class="score">0.</strong>
							<i>0</i>
							<img src="../img/1-star-empty.ebc71406.png">
							<img src="../img/1-star-empty.ebc71406.png">
							<img src="../img/1-star-empty.ebc71406.png">
							<img src="../img/1-star-empty.ebc71406.png">
							<img src="../img/1-star-empty.ebc71406.png">
						</span>
					</p>
					<div class="list">
						<a href=""><img src="../img/1-243d6c6f7d30ee5c61c0f1bd77634e3e570e3f82.jpg"></a>
						<div class="lisr_r">
							<p class="list_text"><a class="commodityPlace" href="">西安大悦城</a></p>
                            <p class="list_text"><a href=""><span class="startTime">2018.12.16</span> ~ <span class="endTime">2019.01.16</span></a></p>
							<div class="list_bottom">
								<p class="blk_blue"><a class="status" href="">售票中</a></p>
								<p class="price">￥<strong class="commodityPrice">39</strong><span>起</span></p>
							</div>
						</div>
					</div>
				</div>
				<div class="cont_buttom">
					<div>
						<a href=""><img src="../img/1-qr-app.a2c8e636.png"></a>
					</div>
					<div>
						<h4><a href="#">票牛APP</a></h4>
						<p><a href="#">热门票随时抢<br>折扣票随时买</a></p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 尾部 -->
    <div class="db" style="color:#919496;">
        <p style="color:#919496;font-size:12px">上海颂品网络科技有限公司 Copyright (c) 2015年 Songpin. All rights reserved. <a href="http://www.miitbeian.gov.cn/" target="_black" class="aa">| 沪ICP备14000399号-2</a></p>
        <div class="db1">
            <p><img src="../img/1-j.jpg" alt=""><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31010602001682" target="_black" class="aa">沪公网安备31010602001682号</a></p>
            <span><img src="../img/1-j2.jpg" alt=""><a href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=2016050618242638" class="aa">上海工商</a></span>
        </div>
    </div>  

     <!-- 城市 -->
    <div>
    <!-- <div class="city-name">上海</div> -->
    
        <div class="citylist" style="display: none">
              <div class="top-rows">
                <div class="row">
                  <div class="title" style="width: 63px">当前城市：</div>
                      <ul>
                        <li class="selected dingwei2" data-name="shanghai">上海</li>
                      </ul>
                </div>
                <div class="row">
                  <div class="title" style="width: 63px">热门城市：</div>
                  <ul class="asdf">
                    <li class="city-item" data-name="shanghai">上海</li>
                    <li class="city-item" data-name="beijing">北京</li>
                    <li class="city-item" data-name="guangzhou">广州</li>
                    <li class="city-item" data-name="shenzhen">深圳</li>
                    <li class="city-item" data-name="chengdu">成都</li>
                    <li class="city-item" data-name="chongqing">重庆</li>
                    <li class="city-item" data-name="tianjin">天津</li>
                    <li class="city-item" data-name="hangzhou">杭州</li>
                    <li class="city-item" data-name="nanjing">南京</li>
                    <li class="city-item" data-name="wuhan">武汉</li>
                    <li class="city-item" data-name="xian">西安</li>
                    <li class="city-item" data-name="changsha">长沙</li>
                    <li class="city-item" data-name="kunming">昆明</li>
                  </ul>
                </div>
              </div>
              <div class="city-indexes">
                <div class="title">按字母查找</div>
                <ul class="hot-city-capitcals">
                  <li class="cap" id="a">A</li><li class="cap" id="b">B</li><li class="cap" id="c">C</li><li class="cap" id="d">D</li><li class="cap" id="f">F</li><li class="cap" id="g">G</li><li class="cap" id="h">H</li><li class="cap" id="j">J</li><li class="cap" id="k">K</li><li class="cap" id="l">L</li><li class="cap" id="m">M</li><li class="cap" id="n">N</li><li class="cap" id="p">P</li><li class="cap" id="q">Q</li><li class="cap" id="r">R</li><li class="cap" id="s">S</li><li class="cap" id="t">T</li><li class="cap" id="w">W</li><li class="cap" id="x">X</li><li class="cap" id="y">Y</li><li class="cap" id="z">Z</li>
                </ul>
              </div>
              <div class="hot-cities">
                <ul id="cityUl">
                  <li data-capital="A" id="A">
                      <div class="capital">A</div>
                      <ul class="items">
                        <div class="item city-item" data-name="anshun">安顺</div><div class="item city-item" data-name="macau">澳门</div>
                      </ul>
                 </li>
                 <li data-capital="B" id="B">
                      <div class="capital">B</div>
                      <ul class="items">
                        <div class="item city-item" data-name="bangkok">曼谷</div><div class="item city-item" data-name="baoding">保定</div><div class="item city-item" data-name="baotou">包头</div><div class="item city-item" data-name="beihai">北海</div><div class="item city-item" data-name="beijing">北京</div><div class="item city-item" data-name="bengbu">蚌埠</div><div class="item city-item" data-name="benxi">本溪</div><div class="item city-item" data-name="binzhou">滨州</div>
                      </ul>
                </li>
                <li data-capital="C" id="C">
                      <div class="capital">C</div>
                      <ul class="items">
                        <div class="item city-item" data-name="changchun">长春</div><div class="item city-item" data-name="changsha">长沙</div><div class="item city-item" data-name="changshu">常熟</div><div class="item city-item" data-name="changzhou">常州</div><div class="item city-item" data-name="chengde">承德</div><div class="item city-item" data-name="chengdu">成都</div><div class="item city-item" data-name="chongqing">重庆</div>
                      </ul>
                </li>
                <li data-capital="D" id="D"> 
                      <div class="capital">D</div>
                      <ul class="items">
                        <div class="item city-item" data-name="dalian">大连</div><div class="item city-item" data-name="daqing">大庆</div><div class="item city-item" data-name="deyang">德阳</div><div class="item city-item" data-name="dezhou">德州</div><div class="item city-item" data-name="dongguan">东莞</div><div class="item city-item" data-name="dongying">东营</div>
                      </ul>
                </li>
                <li data-capital="F" id="F">
                      <div class="capital">F</div>
                      <ul class="items">
                        <div class="item city-item" data-name="foshan">佛山</div><div class="item city-item" data-name="fushun">抚顺</div><div class="item city-item" data-name="fuzhou">福州</div>
                      </ul>
                </li>
                <li data-capital="G" id="G">
                      <div class="capital">G</div>
                      <ul class="items">
                        <div class="item city-item" data-name="ganzhou">赣州</div><div class="item city-item" data-name="guangan">广安</div><div class="item city-item" data-name="guangxiyulin">玉林</div><div class="item city-item" data-name="guangzhou">广州</div><div class="item city-item" data-name="guilin">桂林</div><div class="item city-item" data-name="guiyang">贵阳</div>
                      </ul>
                </li>
                <li data-capital="H" id="H">
                      <div class="capital">H</div>
                      <ul class="items">
                        <div class="item city-item" data-name="haerbin">哈尔滨</div><div class="item city-item" data-name="haikou">海口</div><div class="item city-item" data-name="handan">邯郸</div><div class="item city-item" data-name="hangzhou">杭州</div><div class="item city-item" data-name="hefei">合肥</div><div class="item city-item" data-name="hengshui">衡水</div><div class="item city-item" data-name="hengyang">衡阳</div><div class="item city-item" data-name="heyuan">河源</div><div class="item city-item" data-name="huaian">淮安</div><div class="item city-item" data-name="huanggang">黄冈</div><div class="item city-item" data-name="huhehaote">呼和浩特</div><div class="item city-item" data-name="huizhou">惠州</div><div class="item city-item" data-name="huzhou">湖州</div>
                      </ul>
                </li>
                <li data-capital="J" id="J">
                      <div class="capital">J</div>
                      <ul class="items">
                        <div class="item city-item" data-name="jiangmen">江门</div><div class="item city-item" data-name="jiangxiyichun">宜春</div><div class="item city-item" data-name="jiaxing">嘉兴</div><div class="item city-item" data-name="jilin">吉林</div><div class="item city-item" data-name="jinan">济南</div><div class="item city-item" data-name="jingzhou">荆州</div><div class="item city-item" data-name="jinhua">金华</div><div class="item city-item" data-name="jining">济宁</div><div class="item city-item" data-name="jiujiang">九江</div>
                      </ul>
                </li>
                <li data-capital="K" id="K">
                      <div class="capital">K</div>
                      <ul class="items">
                        <div class="item city-item" data-name="kunming">昆明</div><div class="item city-item" data-name="kunshan">昆山</div>
                      </ul>
                </li>
                <li data-capital="L" id="L">
                      <div class="capital">L</div>
                      <ul class="items">
                        <div class="item city-item" data-name="langfang">廊坊</div><div class="item city-item" data-name="lanzhou">兰州</div><div class="item city-item" data-name="lasvegas">拉斯维加斯</div><div class="item city-item" data-name="leshan">乐山</div><div class="item city-item" data-name="lianyuangang">连云港</div><div class="item city-item" data-name="liaocheng">聊城</div><div class="item city-item" data-name="linyi">临沂</div><div class="item city-item" data-name="lishui">丽水</div><div class="item city-item" data-name="liuzhou">柳州</div><div class="item city-item" data-name="luoyang">洛阳</div>
                      </ul>
                </li>
                <li data-capital="M" id="M">
                      <div class="capital">M</div>
                      <ul class="items">
                        <div class="item city-item" data-name="maanshan">马鞍山</div><div class="item city-item" data-name="maoming">茂名</div><div class="item city-item" data-name="mianyang">绵阳</div><div class="item city-item" data-name="moscow">莫斯科</div><div class="item city-item" data-name="mudanjiang">牡丹江</div>
                      </ul>
                </li>
                <li data-capital="N" id="N">
                      <div class="capital">N</div>
                      <ul class="items">
                        <div class="item city-item" data-name="nanchang">南昌</div><div class="item city-item" data-name="nanjing">南京</div><div class="item city-item" data-name="nanning">南宁</div><div class="item city-item" data-name="nantong">南通</div><div class="item city-item" data-name="ningbo">宁波</div>
                      </ul>
                </li>
                <li data-capital="P" id="P">
                      <div class="capital">P</div>
                      <ul class="items">
                        <div class="item city-item" data-name="pingxiang">萍乡</div>
                      </ul>
                </li>
                <li data-capital="Q" id="Q">
                      <div class="capital">Q</div>
                      <ul class="items">
                        <div class="item city-item" data-name="qianjiang">潜江</div><div class="item city-item" data-name="qingdao">青岛</div><div class="item city-item" data-name="qingyuan">清远</div><div class="item city-item" data-name="qinhuangdao">秦皇岛</div><div class="item city-item" data-name="quanzhou">泉州</div>
                      </ul>
                </li>
                <li data-capital="R" id="R">
                      <div class="capital">R</div>
                      <ul class="items">
                        <div class="item city-item" data-name="rizhao">日照</div><div class="item city-item" data-name="russia">俄罗斯</div>
                      </ul>
                </li>
                <li data-capital="S" id="S">
                      <div class="capital">S</div>
                      <ul class="items">
                        <div class="item city-item" data-name="sanya">三亚</div><div class="item city-item" data-name="shanghai">上海</div><div class="item city-item" data-name="shantou">汕头</div><div class="item city-item" data-name="shaoxing">绍兴</div><div class="item city-item" data-name="shenyang">沈阳</div><div class="item city-item" data-name="shenzhen">深圳</div><div class="item city-item" data-name="shijiazhuang">石家庄</div><div class="item city-item" data-name="singapore">新加坡</div><div class="item city-item" data-name="suining">遂宁</div><div class="item city-item" data-name="suzhou">苏州</div>
                      </ul>
                </li>
                <li data-capital="T" id="T">
                      <div class="capital">T</div>
                      <ul class="items">
                        <div class="item city-item" data-name="taian">泰安</div><div class="item city-item" data-name="taiyuan">太原</div><div class="item city-item" data-name="taizhou">泰州</div><div class="item city-item" data-name="tangshan">唐山</div><div class="item city-item" data-name="tianjin">天津</div>
                      </ul>
                </li>
                <li data-capital="W" id="W">
                      <div class="capital">W</div>
                      <ul class="items">
                        <div class="item city-item" data-name="weifang">潍坊</div><div class="item city-item" data-name="weihai">威海</div><div class="item city-item" data-name="wenzhou">温州</div><div class="item city-item" data-name="wuhan">武汉</div><div class="item city-item" data-name="wuhu">芜湖</div><div class="item city-item" data-name="wulumuqi">乌鲁木齐</div><div class="item city-item" data-name="wuxi">无锡</div><div class="item city-item" data-name="wuzhou">梧州</div>
                      </ul>
                </li>
                <li data-capital="X" id="X">
                      <div class="capital">X</div>
                      <ul class="items">
                        <div class="item city-item" data-name="xiamen">厦门</div><div class="item city-item" data-name="xian">西安</div><div class="item city-item" data-name="hongkong">香港</div><div class="item city-item" data-name="xuzhou">徐州</div>
                      </ul>
                </li>
                <li data-capital="Y" id="Y">
                      <div class="capital">Y</div>
                      <ul class="items">
                        <div class="item city-item" data-name="yancheng">盐城</div><div class="item city-item" data-name="yangzhou">扬州</div><div class="item city-item" data-name="yantai">烟台</div><div class="item city-item" data-name="yibin">宜宾</div><div class="item city-item" data-name="yichang">宜昌</div><div class="item city-item" data-name="yinchuan">银川</div><div class="item city-item" data-name="yingkou">营口</div><div class="item city-item" data-name="yiwu">义乌</div><div class="item city-item" data-name="yulin">榆林</div>
                      </ul>
                </li>
                <li data-capital="Z" id="Z">
                      <div class="capital">Z</div>
                      <ul class="items">
                        <div class="item city-item" data-name="zaozhuang">枣庄</div><div class="item city-item" data-name="zhangjiakou">张家口</div><div class="item city-item" data-name="zhangqiu">章丘</div><div class="item city-item" data-name="zhanjiang">湛江</div><div class="item city-item" data-name="zhaoqing">肇庆</div><div class="item city-item" data-name="zhejiangtaizhou">台州</div><div class="item city-item" data-name="zhengzhou">郑州</div><div class="item city-item" data-name="zhenjiang">镇江</div><div class="item city-item" data-name="zhongshan">中山</div><div class="item city-item" data-name="zhoushan">舟山</div><div class="item city-item" data-name="zhuhai">珠海</div><div class="item city-item" data-name="zhuzhou">株洲</div><div class="item city-item" data-name="zibo">淄博</div><div class="item city-item" data-name="zigong">自贡</div><div class="item city-item" data-name="zunyi">遵义</div>
                      </ul>
                    </li>
                </ul>
              </div>
            </div>
    </div>
    <div id="allmap"></div>

</body>
</html>

<!--<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=a2KhD9EGeKHLLsFaujVVnBmut0Al8vqt"></script>
<script type="text/javascript" src="../js/position.js"></script>-->
<script type="text/javascript" src="../js/userFunctionExecution.js"></script>
<script type="text/javascript" src="../js/cookie.js"></script>
<script type="text/javascript" src="../js/loginRealization.js"></script>
<script type="text/javascript">
    var commodityId;
    var belongToId;
    $(function () {
        commodityId=getUrlParam('commodityId');//获取传来的商品id
        belongToId=getUrlParam('commentId');//获取传来的评论id
        $(".commodityId").val(commodityId);
        $(".belongToId").val(belongToId);
        $(".fatherId").val(belongToId);
        //根据商品id和主评论id查询子评论
        $.ajax({
            type: "POST",
            url: "http://cn.pn.com/api-pn/comment/api/p/commentById",
            data:{commentId:belongToId},
            dataType: "json",
            success: function (data) {
                //绑定用户和评论信息
                $(".mainUserId").text(data.comment.user.userId);//用户id
                $(".userName").text(data.comment.user.nickName);//用户昵称
                $(".xs").text(data.comment.user.userIdentity);//用户标识
                $(".rq").text(getLocalTime(data.comment.commentTime));//评论时间
                $(".childCount").text(data.comment.childCount);//回复次数
                $(".likeCount").text(data.comment.likeCount);//点赞次数
                $(".mainCommId").text(data.comment.commentId);//主评论id
                $(".mainContent").text(data.comment.content);//主评论内容
                var ul=$(".listChildComment").empty();
                $.each(data.comment.childComments.rows, function (i, e) {
                    ul.append(" <li>" +
                        "<div class='userhead'><img style='width: 50px;' src='../img/11-7.png'/>" +
                        "<div style='background-image: url(''); cursor: pointer;' class='avatar'></div>" +
                        "<div class='level'><div class='text'>"+e.user.userIdentity+"</div></div></div>" +
                        "<div class='main'><span class='hideSpan commentId'>"+e.commentId+"</span><div class='user'><span class='hideSpan userId'>"+e.userId+"</span>" +
                        "<div class='name' style='float: left;'>"+e.user.nickName+"</div>" +
                        "<div class='time' style='float: right;margin-right: 7%;'>"+getLocalTime(e.commentTime)+"</div></div>" +
                        "<div class='content'>"+e.content+"</div></div></li>");
                });
                //绑定分页信息
                $("#pageNo").text(data.comment.childComments.curPage);//当前页数
                $("#totalPage").text(data.comment.childComments.pageCount);//总页数
                if(data.comment.childComments.curPage<data.comment.childComments.pageCount){
                    $("#load-more").show();
                }else{
                    $("#load-more").hide();
                }

                //绑定商品信息
                $(".commodityName").text(data.comment.commodity.commodityName);//商品名称
                var star=data.comment.commodity.star;
                if(star==5){
                    $(".commodityStar").children("strong").text("10.");//评分
                    $(".commodityStar").children("img").attr("src","../img/1-star-full.04f7ab77.png");
                }
                $(".commodityPlace").text(data.comment.commodity.placeName);//场地名称
                $(".startTime").text(getLocalTime(data.comment.commodity.startTime));//开始时间
                $(".endTime").text(getLocalTime(data.comment.commodity.endTime));//结束时间
                if(data.comment.commodity.status==1){
                    $(".status").text("售票中");
                } else if(data.comment.commodity.status==2){
                    $(".status").text("暂停售票");
                } else if(data.comment.commodity.status==3){
                    $(".status").text("已过期");
                }
                $(".commodityPrice").text(data.comment.commodity.disPrice);//最低价格
            },
            error: function () {
                layer.msg('加载数据失败，请尝试刷新', {
                    time: 2000, //2s后自动关闭
                });
            }
        });

        //加载更多显示
        $("#load-more").click(function () {
            var pageNo=$("#pageNo").text();
            pageNo++;
            $.ajax({
                type: "POST",
                url: "http://cn.pn.com/api-pn/comment/api/p/listChild",
                data: {belongToId:belongToId,commodityId: commodityId, pageNo: pageNo, pageSize: 10},
                dataType: "json",
                success: function (data) {
                    var ul=$(".listChildComment");
                    $.each(data.rows, function (i, e) {
                        ul.append(" <li>" +
                            "<div class='userhead'><img style='width: 50px;' src='../img/11-7.png'/>" +
                            "<div style='background-image: url(''); cursor: pointer;' class='avatar'></div>" +
                            "<div class='level'><div class='text'>"+e.user.userIdentity+"</div></div></div>" +
                            "<div class='main'><span class='hideSpan commentId'>"+e.commentId+"</span><div class='user'><span class='hideSpan userId'>"+e.userId+"</span>" +
                            "<div class='name' style='float: left;'>"+e.user.nickName+"</div>" +
                            "<div class='time' style='float: right;margin-right: 7%;'>"+getLocalTime(e.commentTime)+"</div></div>" +
                            "<div class='content'>"+e.content+"</div></div></li>");
                    });
                    $("#pageNo").text(data.curPage);//当前页数
                    $("#totalPage").text(data.pageCount);//总页数
                    if(data.curPage<data.pageCount){
                        $("#load-more").show();
                    }else{
                        $("#load-more").hide();
                    }
                },
                error: function () {
                    layer.msg('加载评论失败，请尝试刷新', {
                        time: 2000, //2s后自动关闭
                    });
                }
            });
        });

        //点击回复给input焦点
        $(".hf").click(function () {
            $("#pl").focus();

        });
        //回复评论（添加子评论）
        $(".fr").click(function () {
            //var userId=User.getUserInfo.getResult().userId;
            /*if(userData==undefined){
                layer.msg('请先登录', {
                    time: 2000, //2s后自动关闭
                });
            }else{

            }*/
            //获取商品id
            //获取评论内容
            if($("#pl").val()==""){//非空
                layer.msg('请输入评论内容哦~', {
                    time: 2000, //2s后自动关闭
                });
                return;
            }else{
                //提交数据
                $.ajax({
                    type: "POST",
                    url: "http://cn.pn.com/api-pn/comment/api/p/add",
                    data: $("#form").serialize(),
                    dataType: "json",
                    success: function (data) {
                        layer.msg('回复成功！', {
                            time: 2000, //2s后自动关闭
                        });
                        setTimeout(function () {
                            location.reload();
                        },2000);

                    },
                    error: function () {
                        layer.msg('回复失败！', {
                            time: 2000, //2s后自动关闭
                        });
                        location.reload();
                    }

                });

            }
        });
    });


    //获取url中的commodityId参数
    function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
        var r = window.location.search.substr(1).match(reg);  //匹配目标参数
        if (r != null) return unescape(r[2]); return null; //返回参数值
    }
    //转换时间戳为日期格式
    function getLocalTime(nS) {
        //将时间戳（十三位时间搓，也就是带毫秒的时间搓）转换成时间格式
        let date = new Date(nS);
        let year = date.getFullYear();
        let month = date.getMonth()+1;
        let day = date.getDate();
        month = month < 10 ? "0"+month:month;
        day = day < 10 ? "0"+day:day;
        date = year+'-'+month+'-'+day;
        return date;
    }

</script>

